// 用户
export interface ResponseData {
    "code": number,
    "message": string,
    "ok": boolean
}

export interface User {
    "id"?: number | string,
    "createTime"?: string,
    "updateTime"?: string,
    "username"?: string,
    "password"?: string,
    "name"?: string,
    "phone"?: number,
    "roleName"?: string
}

export type Records = User[]

export interface UserResponseData extends ResponseData {
    data: {
        "records": Records,
        "total": number,
        "size": number,
        "current": number,
        "pages": number
    }
}

// 角色相关
export interface Assign {
    "id": number | string,
    "createTime": string,
    "updateTime": string,
    "roleName": string,
    "remark"?: null
}

export interface AllRoles {
    "id": 1,
    "createTime": string,
    "updateTime": string,
    "roleName": string,
    "remark"?: null
}

export type AssignRoles = Assign[]

export type AllRolesList = AllRoles[]

export interface AllRolesListData extends ResponseData {
    data: {
        "assignRoles": AssignRoles,
        "allRolesList": AllRolesList
    }
}

// 根据用户分配角色
export interface AssignUserRole {
    "roleIdList": number[] | string[],
    "userId": number | string
}
